## set path to builddir (where you want your chroot).
export SABOTAGE_BUILDDIR="/tmp/sabotage"

## set your arch, or try `uname -m`
export A=i386
#export A=x86_64
#export A=mips
#export A=powerpc
#export A=arm
# arch specific flags to pass to the gcc build
# your crosscompiler should be configured equivalently
# if not provided, will be derived from the compiler config
#export GCC_ARCH_CONFIG_FLAGS="--with-float=soft --with-fpu=vfp"

export ARCH=$A

## set the compiler environment
export CC=gcc
export HOSTCC=gcc

## set your core count for faster builds, this is passed as -jXXX to make
## stage0 builds in less than 2minutes using -j9 on an AMD 8core
export MAKE_THREADS=1

# in case you have linux kernel 3.8+ with CONFIG_USER_NS enabled,
# you can use super_chroot in place of chroot, so you don't need
# root perms to build.
# if SUPER is set, the enter-chroot script will use super_chroot.
#export SUPER=1

# you can use a prebuilt butch to speed the build up a bit
# or in case you use aboriginal, with its uclibc toolchain lacking the
# required posix_spawn. if you don't have a butch binary there, you have
# to compile musl, and build butch statically with musl-gcc instead.
# i personally put it into the tarballs dir since i always copy that one
# to the prefered destination anyway.
# if you don't set BUTCH_BIN, it will be downloaded and built before stage0.
#export BUTCH_BIN=$PWD/tarballs/butch-armv6l

# internal paths
# you should leave these all as-is, this is the intended way.
# K is the directory where patches and configs are kept
# C is the directory to place the downloaded tarballs
# S is the directory to extract tarballs and place sources for building stage0
# R is the directory underwhich the new filesystem will be created
# LOGPATH is the directory to place logfiles of builds

# needed to inherit $PWD from toplevel buildscript
[ -z "$H" ] && H="$PWD"

export K="$H"/KEEP
export C="$H"/tarballs
export R="$SABOTAGE_BUILDDIR"
export S="$R"/src
export LOGPATH="$S"/logs

export BUTCH_BUILD_TEMPLATE="$K"/butch_template_configure_cached.txt
export BUTCH_DOWNLOAD_TEMPLATE="$K"/butch_download_template.txt

# this is needed so packages can detect from which stage they're called
export STAGE=0
